from django.contrib import admin
from hosting.databases.models import DatabaseHost, Database

class DatabaseHostAdmin(admin.ModelAdmin):
    fieldsets = (
                (None, {'fields' : ('name', 'host', 'port', 'comment')}),)
    list_display = ('name', 'host', 'port', 'comment')
    order = ('name')
admin.site.register(DatabaseHost, DatabaseHostAdmin)

class DatabaseAdmin(admin.ModelAdmin):
    fieldsets = (
                (None, {'fields' : ('user','host','name','username', 'password')}),)
    list_display = ('user','host','name','username')
    order = ('host')
admin.site.register(Database, DatabaseAdmin)
